Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(l2): add prover benchmarks from L1 RPC downloaded blocks #1705

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from

Conversation

xqft
Copy link
Contributor

@xqft xqft commented Jan 13, 2025

Motivation

We want to benchmark the L2 prover against rsp, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain.

Description

  • adds l2/prover/bench crate

  • adds state fetching functions from the JSON-RPC API (account, block, storage, proofs)

  • adds a RpcDB type to download and cache needed state during block execution

  • adds an execute() function to the Prover type

  • fixes state verification (via state and storage MPTs), verify_db()

  • fixes withdrawals not being processed when using ExecutionDB

  • fixes beacon root call state changes not being comitted when using ExecutionDB

Copy link

github-actions bot commented Jan 13, 2025

| File                                                                            | Lines | Diff |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/proposer/prover_server.rs             | 459   | +8   |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/cache.rs             | 19    | +19  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/constants.rs         | 35    | +35  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/lib.rs               | 3     | +3   |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/main.rs              | 89    | +89  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/rpc/db.rs            | 416   | +416 |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/bench/src/rpc/mod.rs           | 319   | +319 |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/src/prover.rs                  | 140   | +22  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/zkvm/interface/sp1/src/main.rs | 46    | +1   |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/zkvm/interface/src/lib.rs      | 179   | +15  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/utils/prover/proving_systems.rs       | 127   | +4   |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/utils/test_data_io.rs                 | 91    | +6   |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/backends/revm.rs                      | 448   | +17  |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/db.rs                                 | 280   | +105 |
+---------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/execution_db.rs                       | 172   | -57  |
+---------------------------------------------------------------------------------+-------+------+

Total lines added: +1059
Total lines removed: 57
Total lines changed: 1116

@xqft xqft changed the base branch from main to l2/touched_state January 15, 2025 20:46
@xqft xqft changed the title perf(l2): add prover benchmarks from RPC downloaded blocks perf(l2): add prover benchmarks from L1 RPC downloaded blocks Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant